package com.zood.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zood.domain.model;
import com.zood.domain.stone;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface StoneDao  extends BaseMapper<stone> {
    @Select("select * from t_stone where id=#{id}")
    stone getById(@Param("id") int id);

    @Select("select * from t_stone")
    List<stone> getAll1();

    @Delete("delete  FROM t_stone WHERE mid=#{mid} && tid=#{tid} && id=#{id}")
    boolean delete(stone stones);

    @Update("UPDATE t_stone SET sname=#{sname},sort=#{sort},sdescription=#{sdescription},  WHERE mid=#{mid} && tid=#{tid} && id=#{id}")
    boolean update(stone stones);

}

